<template>
  <div class="setting">
    <x-header>设置</x-header>
    <group>
      <cell title="忘记密码" link="/forgetpassword"></cell>
      <!-- <cell title="重置密码" link="/validcode"></cell> -->
      <cell title="关于我们" link="/about"></cell>
    </group>
    <br>
    <x-button class="add-btn" type="primary" @click.native="handleLoginOut">退出登录</x-button>
  </div>
</template>
<script>
import { Vue, Component } from 'vue-property-decorator';
import {
  XHeader,
  Group,
  XButton,
  Cell
} from 'vux';

@Component({
  components: {
    XHeader,
    Group,
    XButton,
    Cell
  }
})
export default class Index extends Vue {
  handleLoginOut () {
    localStorage.setItem('loginInfo', '')
    this.$router.push('/login')
  }
}
</script>
<style lang="less">
  .setting {
    padding-top: 46px;
    .add-btn {
      position: absolute;
      width: 100%;
      bottom: 0;
      left: 0;
    }
  }
</style>
